package com.cm.sys.intermanager.entity;

import java.io.Serializable;
import java.util.Objects;

/**
 *@ClassNameLog
 *@Description
 *@Author WZC
 *@Date2019/12/14 9:37
 *@Version V1.0
 **/
public class Log implements Serializable {
    private String id;
    private String transId;
    private String message;
    private String host_ip;
    private String timestamp;
    private String fileType;

    public Log() {
    }

    public Log(String id, String transId, String message, String host_ip, String timestamp, String fileType) {
        this.id = id;
        this.transId = transId;
        this.message = message;
        this.host_ip = host_ip;
        this.timestamp = timestamp;
        this.fileType = fileType;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTransId() {
        return transId;
    }

    public void setTransId(String transId) {
        this.transId = transId;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getHost_ip() {
        return host_ip;
    }

    public void setHost_ip(String host_ip) {
        this.host_ip = host_ip;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o){
            return true;
        }
        if (!(o instanceof Log)){
            return false;
        }
        Log log = (Log) o;
        return Objects.equals(id, log.id) &&
                Objects.equals(transId, log.transId) &&
                Objects.equals(message, log.message) &&
                Objects.equals(host_ip, log.host_ip) &&
                Objects.equals(timestamp, log.timestamp) &&
                Objects.equals(fileType, log.fileType);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, transId, message, host_ip, timestamp, fileType);
    }

    @Override
    public String toString() {
        return "Log{" +
                "id='" + id + '\'' +
                ", transId='" + transId + '\'' +
                ", message='" + message + '\'' +
                ", host_ip='" + host_ip + '\'' +
                ", timestamp='" + timestamp + '\'' +
                ", fileType='" + fileType + '\'' +
                '}';
    }
}
